package com.zxl.study.callback.v3;

import java.util.concurrent.TimeUnit;

/**
 * @auther zzyy
 * @create 2023-08-12 20:34
 */
public class GithubV3 // B
{
    public void push(MyCallback myCallback, String message)
    {
        System.out.println("git push GithubV3");

        //暂停毫秒
        try { TimeUnit.MILLISECONDS.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); }

        try
        {
            myCallback.onSuccess(message+" after GithubV3 server"); // 执行回调
        }catch (Exception e){
            myCallback.onError(e);
        }
    }

}
